package com.nuoniu.sibanyun.controller.crm.call;


import com.nuoniu.sibanyun.common.BaseController;
import com.nuoniu.sibanyun.common.result.HttpResult;
import com.nuoniu.sibanyun.entity.crm.call.CrmCallSettings;
import com.nuoniu.sibanyun.entity.crm.call.dto.CrmCallTaskDetailSaveDto;
import com.nuoniu.sibanyun.service.crm.call.ICrmCallSettingsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 客户管理-外呼管理-外呼基础设置 前端控制器
 * </p>
 *
 * @author 白强
 * @since 2022-03-14
 */
@RestController
@RequestMapping("/crm/callSettings")
@Api(value="客户管理-外呼管理-外呼基础设置 ",tags={"客户管理-外呼管理-外呼基础设置"})
public class CrmCallSettingsController extends BaseController {

    @Autowired
    private ICrmCallSettingsService callSettingsService;


    @GetMapping("list")
    @ApiOperation(value = "查询公司设置")
    public HttpResult listCrmCallSettings() {
        return HttpResult.ok(callSettingsService.listCrmCallSettings());
    }

    @PostMapping("batchSave")
    @ApiOperation(value = "批量保存")
    public HttpResult batchSaveCrmCallSettings(@RequestBody List<CrmCallSettings> crmCallSettingsList){
        callSettingsService.batchSaveCrmCallSettings(crmCallSettingsList);
        return HttpResult.ok();
    }
}
